<div class="page-search-bar">
	<div class="widget-header">
		<div class="align-left">
			<%= simple_form_for(orders_path, :method => 'get') do |f| %>
			<input type="text" name="order[order_code]" class="input-xs" placeholder="订单编号">
			<select name="order[customer_id]" class="input-xs" placeholder="客户">
				<option value="">客户名</option>
				<% Customer.all.each do |customer|%>
				<option value="<%= customer.id%>"><%= customer.name%></option>
				<% end %>
			</select>
			<input type="text" name="order[customer_po]" class="input-xs" placeholder="客户订单号">
			<input type="text" name="order[contract_no]" class="input-xs" placeholder="合同号">
			<input type="text" name="order[tieta_settlement_no]" class="input-xs" placeholder="铁塔财务报账号">
			<div class="widget-buttons buttons-bordered">
				<input class="btn btn-blue btn-xs" name="commit" type="submit" value="搜索">
			</div>
			<% end %>
		</div>
	</div>
</div>

<div class="row">
	<div class="col-xs-12 col-md-12">

		<div class="widget">

			<div class="widget-header bordered-bottom bordered-themeprimary">
				<i class="widget-icon fa fa-tasks themeprimary"></i>
				<span class="widget-caption themeprimary">付款列表</span>
				<div class="widget-buttons buttons-bordered">
					<%= button_to '新建付款', '', method: :get, :class => "btn btn-blue btn-xs" %>
				</div>

			</div><!--Widget Header-->
			<div class="widget-body">
				<div class="widget-main no-padding">

					<div class="flip-scroll">
						<div class="dataTables_wrapper form-inline no-footer">
							<table class="table table-bordered table-striped table-condensed flip-content">
								<thead class="flip-content bordered-palegreen">
									<tr>
										<th>Date</th>
										<th>Amount</th>
										<th colspan="3"></th>
									</tr>
								</thead>

								<tbody>
									<% @payments.each do |payment| %>
									<tr>
										<td><%= payment.date %></td>
										<td><%= payment.amount %></td>
										<td><%= link_to 'Show', payment %></td>
										<td><%= link_to 'Edit', edit_payment_path(payment) %></td>
										<td><%= link_to 'Destroy', payment, method: :delete, data: { confirm: 'Are you sure?' } %></td>
									</tr>
									<% end %>
								</tbody>

							</table>
							<div class="row DTTTFooter">
								<div class="col-xs-12 col-md-12">
									<div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
										<%= paginate @payments, window: 1, outer_window: 1, remote: true %>
									</div>
								</div>
							</div>

						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
